#include "stdafx.h"
#include "Sound3d.h"

Sound3d::Sound3d(unsigned int eventId, float posX, float posY, float posZ) {
	m_evt = SoundPlayer::getInstance()->getEvent(eventId);
	this->setPos(posX, posY, posZ);
	this->setVel(0,0,0);
}

void Sound3d::setPos(float x, float y, float z) {
	m_pos.x = x;
	m_pos.y = y;
	m_pos.z = z;
	m_evt->set3DAttributes(&m_pos, &m_vel);
}

void Sound3d::setVel(float x, float y, float z) {
	m_vel.x = x;
	m_vel.y = y;
	m_vel.z = z;
	m_evt->set3DAttributes(&m_pos, &m_vel);
}